package com.vogue.supplymall.order.common;

import com.vogue.supplymall.common.domain.dto.AlterRefundInfo;

/**
 * The type Check refund utils.
 *
 * @aouthor: zhangliang
 * @date: Create in 2018-03-16
 */
public final class CheckRefundUtils {
    private CheckRefundUtils() {
    }

    /**
     * Check add refund parameter boolean.
     *
     * @param refundInfo    the refund info
     * @param loginUserType the login user type
     * @return the boolean
     */
    public static Boolean checkAddRefundParameter(AlterRefundInfo refundInfo, Integer loginUserType) {
        return null == refundInfo.getRefundway()
                || null == refundInfo.getCause()
                || null == refundInfo.getOiid()
                || null == refundInfo.getOipid()
                || null == refundInfo.getOrderid()
                || null == refundInfo.getRefundprice()
                || null == refundInfo.getRefundquantity();
    }

    /**
     * Check update refund parameter boolean.
     *
     * @param refundInfo    the refund info
     * @param loginUserType the login user type
     * @return the boolean
     */
    public static Boolean checkUpdateRefundParameter(AlterRefundInfo refundInfo, Integer loginUserType) {
        return null == refundInfo.getRefundstatusid()
                || null == refundInfo.getRefundstatus()
                || null == refundInfo.getAction();
    }
}
